/* 
 *  Copyright 2012 CodeMagi, Inc.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.codemagi.servlets.newsletter.model;

import java.io.Serializable;

/**
 *  Models a subscription to a newsletter.
 *
 *  @version 1.0
 *  @author August Detlefsen for CodeMagi, Inc.
 */
public class Signup extends com.codemagi.servlets.model.BaseBean implements Serializable {

    //MEMBERS ---------------------------------
    private NewsletterTopic topic;
    private String email;
    private String removeHash;


    //GETTERS AND SETTERS ---------------------------------                                              
    public void setTopic(NewsletterTopic newValue) {
        topic = newValue;
    }

    public NewsletterTopic getTopic() {
        return topic;
    }

    public void setEmail(String newValue) {
        email = newValue;
    }

    public String getEmail() {
        return email;
    }

    public void setRemoveHash(String newValue) {
        removeHash = newValue;
    }

    public String getRemoveHash() {
        return removeHash;
    }
    
    //SPECIAL GETTERS AND SETTERS ----------------------------------------
    public String getTopicName() {
	if (topic == null) return "";
	
	return topic.getName();
    }

}
